Scripts that contain functions go in the head section of the document. Then we can be sure that the script is loaded before the function is called

#Title: Head section : JavaScript Where To ... : Examples
#Element: 88: Head section : JavaScript Where To ... : Examples
#Article: 78: JavaScript Where To ...